package
{
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequest;
	
	import root.TestRoot;
	
	public class LoadVariable extends TestRoot
	{
		private	var	_urlLoader:URLLoader = null;
		
		public function LoadVariable()
		{
			super();
			this._urlLoader = new URLLoader();
			var urlReq:URLRequest = new URLRequest("http://localhost/example.txt");
			this._urlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
			this._urlLoader.addEventListener(Event.COMPLETE, onLoadComplete);
			this._urlLoader.load(urlReq);
		}
		
		public	function	onLoadComplete(evt:Event):void{
			for(var name:String in this._urlLoader.data){
				this.trace(name+"="+this._urlLoader.data[name]);
			}

		}
	}
}